An Approach for Syntax Tree Construction using Formal Specification Language
نویسندگان
چکیده
A Compiler is a language translator which translates high level language to low level language, this is the task of a compiler. Removing the bugs of source program does not assure that the generated target code is completely error free because there may be bugs in compiler also. So it is more important to verify the Compiler itself. Lexical analyzer is a first phase and main part of compiler used for scanning input stream of characters and grouping into tokens. In this paper formal construction of syntax tree is described from the regular expression to verify the lexical analyzer and this is the aim of paper. If the syntax tree will be constructed successfully for the given regular expression then the lexical analyzer will be verifi ed. Formal specifications can be rigorously validated and verified leading to the early detection of specification errors. The widely used formal specification language is VDM(Vienna Development Method), Z notation and B. Here t he specification is described using Model oriented formal specification languages Vienna Development Method (VDM) because Vienna Development Method provide support for concurrency control and also using VDM Software requirement specification can be automatically converted into computer source code. Z notation does not support for concurrency control and also software requirement specification can not be automatically converted into computer source code. B method also does not support for concurrency control. Keywords—Compiler Verification, Formal Specification, Lexical Analyzer, Regular Expression, VDM.
منابع مشابه
Syntax-Tree Regular Expression Based DFA FormalConstruction
Compiler is a program whose functionality is to translate a computer program written in source language into an equivalent machine code. Compiler construction is an advanced research area because of its size and complexity. The source codes are in higher level languages which are usually complex and, consequently, increase the level of abstraction. Due to such reasons, design and construction o...
متن کاملAbstract Syntax Can Make the Definition of Modelica Less Abstract
Syntax Can Make the Definition of Modelica Less Abstract David Broman and Peter Fritzson Department of Computer and Information Science Linköping University, Sweden {davbr,petfr}@ida.liu.se Abstract. Modelica is an open standardized language used for modeling and simulation of complex physical systems. The language specifiModelica is an open standardized language used for modeling and simulatio...
متن کاملSpecification and Construction of Control Flow Semantics a generic approach using graph transformations
The semantics of programming languages lack a formal, standardized specification language. We focus on control flow semantics and propose a graphical specification framework for these semantics, consisting of three elements: a graphical control flow specification language, a rule-based approach for constructing flow graphs and transformations from the former to the latter. In this thesis we int...
متن کاملThe ModelCC Model-Based Parser Generator
Formal languages let us define the textual representation of data with precision. Formal grammars, typically in the form of BNF-like productions, describe the language syntax, which is then annotated for syntax-directed translation and completed with semantic actions. When, apart from the textual representation of data, an explicit representation of the corresponding data structure is required,...
متن کاملA Rigorous Approach to Reviewing Formal Specifications ∗
I put forward a new approach to rigorously reviewing formal specifications to ensure their internal consistency and validity. This approach includes four steps: (1) deriving properties as review targets based on the syntax and semantics of the specification, (2) building a review task tree to present all the necessary review tasks for each property, (3) carrying out reviews based on the review ...
متن کامل